package AS3 {
import AS3.calculator.FossilsConsumption;

public class CountryEmission {

    private var _general:Number = new Number(0);
    private var _deforestation:Number = new Number(0);
    private var _electricity:Number = new Number(0);
    private var _consumption:Number = new Number(0);
    private var _food:Number = new Number(0);
    private var _flights:Number = new Number(0);
    private var _publicTransport:Number = new Number(0);
    private var _carProduction:Number = new Number(0);
    private var _fuelBurnings:Number = new Number(0);
    private var _airCondition:Number = new Number(0);
    private var _warmWater:Number = new Number(0);
    private var _heating:Number = new Number(0);
    private var _maintenance:Number = new Number(0);

    private var _averageEmission:Number = new Number(0);
    private var _exportEmission:Number = new Number(0);
    private var co2_kwh:Number = new Number(0);

    private var _coalTonnePerCO2Tonne:Number = new Number(0);
    private var _gasM3PerCO2Tonne:Number = new Number(0);
    private var _oilTonnePerCO2Tonne:Number = new Number(0);

    private var _averageConsumptionGJ:Number = new Number(0);

    private var _personalConsumptionEnergy:EnergyConsumption = new EnergyConsumption();
    private var _airTransportEnergy:EnergyConsumption = new EnergyConsumption();
    private var _publicTransportEnergy:EnergyConsumption = new EnergyConsumption();
    private var _carProductionEnergy:EnergyConsumption = new EnergyConsumption();
    private var _fuelBurningsEnergy:EnergyConsumption = new EnergyConsumption();
    private var _airConditioningEnergy:EnergyConsumption = new EnergyConsumption();
    private var _hotWaterEnergy:EnergyConsumption = new EnergyConsumption();
    private var _heatingEnergy:EnergyConsumption = new EnergyConsumption();
    private var _constructionMaintenanceEnergy:EnergyConsumption = new EnergyConsumption();
    private var _foodEnergy:EnergyConsumption = new EnergyConsumption();
    private var _directElectricity:EnergyConsumption = new EnergyConsumption();
    private var _generalEnergy:EnergyConsumption = new EnergyConsumption();

    private var _fossilConsumption:FossilsConsumption;

    public function setEnergyConsumption(calcResult:CalculationResult):void {
        this.personalConsumptionEnergy = calcResult.personalConsumptionEnergy;
        this.airTransportEnergy = calcResult.airTransportEnergy;
        this.publicTransportEnergy = calcResult.publicTransportEnergy;
        this.carProductionEnergy = calcResult.carProductionEnergy;
        this.fuelBurningsEnergy = calcResult.fuelBurningsEnergy;
        this.airConditioningEnergy = calcResult.airConditioningEnergy;
        this.hotWaterEnergy = calcResult.hotWaterEnergy;
        this.heatingEnergy = calcResult.heatingEnergy;
        this.foodEnergy = calcResult.foodEnergy;
        this.directElectricity = calcResult.directElectricity;
        this.generalEnergy = calcResult.generalEnergy;
    }


    public function get averageConsumptionGJ():Number {
        return _averageConsumptionGJ;
    }

    public function set averageConsumptionGJ(value:Number):void {
        _averageConsumptionGJ = value;
    }

    public function get personalConsumptionEnergy():EnergyConsumption {
        return _personalConsumptionEnergy;
    }

    public function set personalConsumptionEnergy(value:EnergyConsumption):void {
        _personalConsumptionEnergy = value;
    }

    public function get airTransportEnergy():EnergyConsumption {
        return _airTransportEnergy;
    }

    public function set airTransportEnergy(value:EnergyConsumption):void {
        _airTransportEnergy = value;
    }

    public function get publicTransportEnergy():EnergyConsumption {
        return _publicTransportEnergy;
    }

    public function set publicTransportEnergy(value:EnergyConsumption):void {
        _publicTransportEnergy = value;
    }

    public function get airConditioningEnergy():EnergyConsumption {
        return _airConditioningEnergy;
    }

    public function set airConditioningEnergy(value:EnergyConsumption):void {
        _airConditioningEnergy = value;
    }

    public function get hotWaterEnergy():EnergyConsumption {
        return _hotWaterEnergy;
    }

    public function set hotWaterEnergy(value:EnergyConsumption):void {
        _hotWaterEnergy = value;
    }

    public function get heatingEnergy():EnergyConsumption {
        return _heatingEnergy;
    }

    public function set heatingEnergy(value:EnergyConsumption):void {
        _heatingEnergy = value;
    }

    public function get constructionMaintenanceEnergy():EnergyConsumption {
        return _constructionMaintenanceEnergy;
    }

    public function set constructionMaintenanceEnergy(value:EnergyConsumption):void {
        _constructionMaintenanceEnergy = value;
    }

    public function get foodEnergy():EnergyConsumption {
        return _foodEnergy;
    }

    public function set foodEnergy(value:EnergyConsumption):void {
        _foodEnergy = value;
    }

    public function get directElectricity():EnergyConsumption {
        return _directElectricity;
    }

    public function set directElectricity(value:EnergyConsumption):void {
        _directElectricity = value;
    }

    public function get generalEnergy():EnergyConsumption {
        return _generalEnergy;
    }

    public function set generalEnergy(value:EnergyConsumption):void {
        _generalEnergy = value;
    }

    public function get carProductionEnergy():EnergyConsumption {
        return _carProductionEnergy;
    }

    public function set carProductionEnergy(value:EnergyConsumption):void {
        _carProductionEnergy = value;
    }

    public function get fuelBurningsEnergy():EnergyConsumption {
        return _fuelBurningsEnergy;
    }

    public function set fuelBurningsEnergy(value:EnergyConsumption):void {
        _fuelBurningsEnergy = value;
    }

    public function get fossilConsumption():FossilsConsumption {
        return _fossilConsumption;
    }

    public function set fossilConsumption(value:FossilsConsumption):void {
        _fossilConsumption = value;
    }

    public function get averageEmission():Number {
        return _averageEmission;
    }

    public function set averageEmission(value:Number):void {
        _averageEmission = value;
    }

    public function get exportEmission():Number {
        return _exportEmission;
    }

    public function set exportEmission(value:Number):void {
        _exportEmission = value;
    }

    public function get general():Number {
        return _general;
    }

    public function set general(value:Number):void {
        _general = value;
    }

    public function get deforestation():Number {
        return _deforestation;
    }

    public function set deforestation(value:Number):void {
        _deforestation = value;
    }

    public function get electricity():Number {
        return _electricity;
    }

    public function set electricity(value:Number):void {
        _electricity = value;
    }

    public function get consumption():Number {
        return _consumption;
    }

    public function set consumption(value:Number):void {
        _consumption = value;
    }

    public function get food():Number {
        return _food;
    }

    public function set food(value:Number):void {
        _food = value;
    }

    public function get flights():Number {
        return _flights;
    }

    public function set flights(value:Number):void {
        _flights = value;
    }

    public function get publicTransport():Number {
        return _publicTransport;
    }

    public function set publicTransport(value:Number):void {
        _publicTransport = value;
    }

    public function get carProduction():Number {
        return _carProduction;
    }

    public function set carProduction(value:Number):void {
        _carProduction = value;
    }

    public function get fuelBurnings():Number {
        return _fuelBurnings;
    }

    public function set fuelBurnings(value:Number):void {
        _fuelBurnings = value;
    }

    public function get airCondition():Number {
        return _airCondition;
    }

    public function set airCondition(value:Number):void {
        _airCondition = value;
    }

    public function get warmWater():Number {
        return _warmWater;
    }

    public function set warmWater(value:Number):void {
        _warmWater = value;
    }

    public function get heating():Number {
        return _heating;
    }

    public function set heating(value:Number):void {
        _heating = value;
    }

    public function get maintenance():Number {
        return _maintenance;
    }

    public function set maintenance(value:Number):void {
        _maintenance = value;
    }

    public function copy():CountryEmission {
        var copy:CountryEmission = new CountryEmission();

        copy.exportEmission = this.exportEmission;
        copy.averageEmission = this.averageEmission;
        copy.setCO2KWhRatio(this.getCO2KWhRatio());

        copy.coalTonnePerCO2Tonne = this.coalTonnePerCO2Tonne;
        copy.oilTonnePerCO2Tonne = this.oilTonnePerCO2Tonne;
        copy.gasM3PerCO2Tonne = this.gasM3PerCO2Tonne;

        copy.general = this.general;
        copy.deforestation = this.deforestation;
        copy.electricity = this.electricity;
        copy.consumption = this.consumption;
        copy.food = this.food;
        copy.flights = this.flights;
        copy.publicTransport = this.publicTransport;
        copy.carProduction = this.carProduction;
        copy.fuelBurnings = this.fuelBurnings;
        copy.airCondition = this.airCondition;
        copy.warmWater = this.warmWater;
        copy.heating = this.heating;
        copy.maintenance = this.maintenance;

        return copy;
    }

    public function getCO2KWhRatio():Number {
        return co2_kwh;
    }

    public function setCO2KWhRatio(setValue:Number):void {
        co2_kwh = setValue;
    }

    public function set coalTonnePerCO2Tonne(setValue:Number):void {
        _coalTonnePerCO2Tonne = setValue;
    }

    public function get coalTonnePerCO2Tonne():Number {
        return _coalTonnePerCO2Tonne;
    }

    public function set gasM3PerCO2Tonne(setValue:Number):void {
        _gasM3PerCO2Tonne = setValue;
    }

    public function get gasM3PerCO2Tonne():Number {
        return _gasM3PerCO2Tonne;
    }

    public function set oilTonnePerCO2Tonne(setValue:Number):void {
        _oilTonnePerCO2Tonne = setValue;
    }

    public function get oilTonnePerCO2Tonne():Number {
        return _oilTonnePerCO2Tonne;
    }
}
}